package world.hezi.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import world.hezi.entity.UserXp;

import java.util.List;

@Mapper
public interface UserXpMapper {
//    List<String> selectAll(@Param("type") Integer type);
    @Insert("insert into user_xp(user_id,tag_id) values (#{userId},#{tagId})")
    void insert(UserXp userXp);
    List<String> getUserXp(Long id);
    @Delete("delete from user_xp where user_id = #{sender} and tag_id = (select id from pic_tag where tag = #{xp})")
    void delUserXp(@Param("sender") Long sender,@Param("xp")String xp);
}
